From: jenkins-bot Date: Sat, 5 Jan 2013 22:07:32 +0000 (+0000) Subject: Merge "Normalise inline comment markers to "//" in WikiPage.php" X-Git-Tag: 1.31.0-rc.0~21130 X-Git-Url: http://git.cyclocoop.org/%22.%24match%5B1%5D.%22?a=commitdiff_plain;h=642b5f238dc1a14836459e0401ecdb4d58f999c4;p=lhc%2Fweb%2Fwiklou.git Merge "Normalise inline comment markers to "//" in WikiPage.php" --- 642b5f238dc1a14836459e0401ecdb4d58f999c4 diff --cc includes/WikiPage.php index 7ed48acd19,65d19a451c..70ed7e7d9d --- a/includes/WikiPage.php +++ b/includes/WikiPage.php @@@ -2301,16 -2290,12 +2301,16 @@@ class WikiPage extends Page implements ->inContentLanguage()->text(); } - $protectDescription .= ') '; + if ( $protectDescription !== '' ) { + $protectDescription .= wfMessage( 'word-separator' )->inContentLanguage()->text(); + } + $protectDescription .= wfMessage( 'protect-summary-desc' ) + ->params( $actionText, $restrictionsText, $expiryText ) + ->inContentLanguage()->text(); } } - $protectDescription = trim( $protectDescription ); - if ( $id ) { # Protection of existing page + if ( $id ) { // Protection of existing page if ( !wfRunHooks( 'ArticleProtect', array( &$this, &$user, $limit, $reason ) ) ) { return Status::newGood(); } @@@ -2353,17 -2338,15 +2353,17 @@@ $editComment .= ": $reason"; } if ( $protectDescription ) { - $editComment .= " ($protectDescription)"; + $editComment .= wfMessage( 'word-separator' )->inContentLanguage()->text(); + $editComment .= wfMessage( 'parentheses' )->params( $protectDescription )->inContentLanguage()->text(); } if ( $cascade ) { - // FIXME: Should use 'brackets' message. - $editComment .= ' [' . wfMessage( 'protect-summary-cascade' ) - ->inContentLanguage()->text() . ']'; + $editComment .= wfMessage( 'word-separator' )->inContentLanguage()->text(); + $editComment .= wfMessage( 'brackets' )->params( + wfMessage( 'protect-summary-cascade' )->inContentLanguage()->text() + )->inContentLanguage()->text(); } - # Insert a null revision + // Insert a null revision $nullRevision = Revision::newNullRevision( $dbw, $id, $editComment, true ); $nullRevId = $nullRevision->insertOn( $dbw );